package com.lzx.spring3;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

import com.lzx.spring3.meta.User;

public class Spring3Main2 {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new AnnotationConfigApplicationContext(
				AppConfig.class);

		JdbcTemplate jdbcTemplate = applicationContext.getBean("jdbcTemplate",
				JdbcTemplate.class);
		
		AppConfig appConfig = applicationContext.getBean(AppConfig.class);
		System.out.println(appConfig.userName);
//		System.out.println(AppConfig.userName);
		System.out.println(jdbcTemplate);
		System.out.println();

	}

}
